package com.example.zuoye.dao;

import com.example.zuoye.entity.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookDAO {
    Book selectBookInfoByNameAndAuthor(@Param("book_name") String book_name,
                                       @Param("book_author") String book_author);

    Book selectBookInfoByName(@Param("book_name") String book_name);


    int deleteBookInfoById(@Param("book_id") Integer book_id);

    List<Book> selectBookInfo();

    int insertBookInfo(@Param("book_name") String book_name,
                       @Param("book_author")String book_author,
                       @Param("book_press")String book_press,
                       @Param("book_date")String book_date,
                       @Param("book_number")Integer book_number,
                       @Param("book_image")String book_image);

    int deleteBookInfoByNameAndAuthor(@Param("book_name") String book_name,
                                      @Param("book_author") String book_author);

    int updateBookInfoById(@Param("book_id") Integer book_id,
                           @Param("book_name") String book_name,
                           @Param("book_author")String book_author,
                           @Param("book_press")String book_press,
                           @Param("book_date")String book_date,
                           @Param("book_number")Integer book_number,
                           @Param("book_image")String book_image);
}
